package com.chatroom.service;

import com.chatroom.model.PrivateChatRoom;
import com.chatroom.model.User;

import java.util.Optional;

public interface PrivateChatRoomService {
    
    // 获取两个用户之间的私聊房间，如果不存在则创建
    PrivateChatRoom getOrCreatePrivateChatRoom(User user1, User user2);
    
    // 通过房间号查找私聊房间
    Optional<PrivateChatRoom> findByRoomCode(String roomCode);
    
    // 通过两个用户查找私聊房间
    Optional<PrivateChatRoom> findByUsers(User user1, User user2);
    
} 